home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: lut.ac.uk!usenet
- From: PJ Common <p.j.common1@student.lut.ac.uk>
- Subject: C Compiler Bug
- Sender: usenet@lut.ac.uk (Usenet-News)
- Message-ID: <3131996E.41C67EA6@student.lut.ac.uk>
- Date: Mon, 26 Feb 1996 11:28:46 GMT
- X-Nntp-Posting-Host: sun-co03.lut.ac.uk
- Content-Transfer-Encoding: 7bit
- Content-Type: text/plain; charset=us-ascii
- Mime-Version: 1.0
- X-Mailer: Mozilla 2.0 (X11; I; SunOS 4.1.4 sun4c)
- Organization: Loughborough University, UK.
-
- Anyone had any problems with Dice C 3.01 when using floating point
- arithmetic.
- As an example the following simple program which is known to
- compile and work crashes dc1 - the actual dice compiler.
-
- /* test.c */
- /* program to convert inches to feet */
- #include <stdio.h>
-
- void main(void)
- {
- float feet;
- int inches = 0, start_value = 0, end_value = 24, step_value = 6;
-
- printf("inches\tfeet\n");
- while (inches <= end_value)
- {
- feet = inches / 12.0;
- printf("%d\t%.2f\n",inches,feet);
- inches += step_value;
- }
- }
-
- The program was compiled from the CLI using
- dcc -lm test.c
-
- dc1 fails with the error #8000000B.
-
- Using Snoopdos shows all goes well until dc1 loads the math librarys.
- As a test the math libs (in libs:) were removed, dc1 still crashes.
-
- The ultimate test was installing dice to floppy, booting from the
- workbench 3.0 floppys (so as to avoid accessing my hd)and compiling the
- program from there - same result dc1 crahses. Ahhhh!!!
-
- I'm a fairly proficient amiga user (A1200,6meg,fpu,hd,3.0), but this one
- has beaten me and got me really pissed off. Any help appreciated.
-
- Cheers, Paul
-
- Replies to this group and/or P.J.Common1@student.lut.ac.uk
-